#include "BossItemData.h"

BossItemData::BossItemData(int id, ItemType Itemtype)
{
	this->type = id;
	itemType = Itemtype;
	switch(Itemtype)
	{
	case ITEM_LEFT:
		this->rect = new Rect(_POSITION_ITEM_LEFT_X, _POSITION_ITEM_Y, _OBS_BOSS_ITEM_3_HEIGHT, _OBS_BOSS_ITEM_3_WIDTH);
		this->rect->Vx = -_ITEM_V;
		break;
	case ITEM_RIGHT:
		this->rect = new Rect(_POSITION_ITEM_RIGHT_X, _POSITION_ITEM_Y, _OBS_BOSS_ITEM_3_HEIGHT, _OBS_BOSS_ITEM_3_WIDTH);
		this->rect->Vx = _ITEM_V;
		break;
	}
	this->rect->Vy = 0;

	this->initData();
}

void BossItemData::initSpriteHandler(LPD3DXSPRITE spritehandler)
{
	sprites->initSpriteHandler(spritehandler);
}

void BossItemData::initData()
{
	this->initSprite();
}
void BossItemData::initSprite()
{
	sprites = new Sprites(rect);
	sprites->addSprite(_STATE_MAP_STAGE3_BOSS_ITEM_1, _ID_MAP_STAGE3_BOSS_ITEM_1,5);
	sprites->setState(_STATE_MAP_STAGE3_BOSS_ITEM_1);
}